import { IncomingHttpHeaders } from 'http';

import query from '@dfeidao/atom-nodejs/db/query';
import { productid,systemid } from '../../atom/config';
interface Message {
	filter: {
		pn: number
	};
	// cookie: {
	// 	uk: string;
	// 	[key: string]: string
	// };
	// urls: {
	// 	base: string;
	// 	origin: string;
	// 	url: string;
	// };
	// query: {};
	// params: {};
	// headers: {};
	// captcha: string;
}

export default async function atom(message: Message, action_id: string, session_id: string, headers: IncomingHttpHeaders) {
	const P = query(action_id, session_id, systemid);
	P.prepare('question_bank', ['question_no'], { productid, topic_type: '判断题' }, 5, message.filter.pn, [], []);
	const [dt] = await P.exec();
	return { dt };
}
